<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="../css/css.css" rel="stylesheet" type="text/css" />
<link href="../css/dtree.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../scripts/dtreeAuth.js"></script>
<style type="text/css">
   .art_ul {}
   .art_ul li{padding:2px;display:block;border:1px solid red;overflow: hidden;border:1px solid #666;}
   .art_ul li img{width:120px;height:88px;}
   .art_ul div{float:left;padding:2px;}
   .content_main table td {text-align: left;}
</style>

</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">商品管理->添加|编辑商品信息</div>
    <div class="main_soso">
    	
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <th width="100%" style="border-left:none;text-align: left;font-weight: normal;">商品基本信息 </th>
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <form action="/product/su_product_view.shtml"   name="form01" method="post" enctype="multipart/form-data">
    <input name="id" value="${pv.id}"  type="hidden"/>
    <input name="productId" value="${productId}"  type="hidden"/>
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <tr>
        <td width="15%" style="border-left:none" align="right">作品名称：</td>
        <td width="">${product.productName}</td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">显示模块：</td>
        <td width="">
               <select name="pv.viewChannel">
                  <app:cons_select code="001" value="${pv.viewChannel}"></app:cons_select>
               </select>
        </td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">显示类型：</td>
        <td width="">
               <select name="pv.viewType">
                  <app:cons_select code="002" value="${pv.viewType}"></app:cons_select>
               </select>
        </td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">商品渠道：</td>
        <td width="">
               <select name="pv.isDsp" id="pv.isDsp" onchange="isDspChange(this)">
                   <option value="0" <c:if test="${pv.isDsp!='1'}">selected="selected"</c:if>>购购网</option>
                   <option value="1" <c:if test="${pv.isDsp=='1'}">selected="selected"</c:if>>万表商城</option>
               </select>&nbsp;&nbsp;
               
               <span style="display:none;" id="pv.dspNameSpan"> 商品分类：
               <select  name="pv.dspName" id="pv.dspName" >
                   <option value="">所有商品</option>
                   <c:forEach items="${list}" var="o">
                       <option <c:if test="${pv.dspName==o[0]}">selected="selected"</c:if> value="${o[0]}">${o[1]}</option>
                   </c:forEach> 
               </select>
               
                                            商品数量：
                 <input type="text" name="pv.num" value="${pv.num}" size="8"/>
               </span>
               
        </td>
      </tr>
      
      <tr>
        <td width="15%" style="border-left:none" align="right">创意图：</td>
        <td width="">
             <input name="pv.imgPath" readonly="readonly" value="${pv.imgPath}" proxy="uploadDiv"  type="hidden" size="8"  class="inputwidth01"  id="product.imgPath_input"/> 
               <div id="uploadDiv" class="uploadDiv">
		                 <a href="#" class="fbtn">选择文件</a><input name="resource" value="" id="uploadFile" size="1" class="ufile" type="file"/>
		                 <div class="rate" id="rate" style="display:none;"></div>
		       </div>
        </td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">创意标题：</td>
        <td width=""><input name="pv.textTitle" type="text" value="${pv.textTitle}"  class="inputwidth01" style="width:160px"  id="product.productPrice" maxlength="32" /> 
        </td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">创意详细：</td>
        <td width=""><input name="pv.textContent" type="text" value="${pv.textContent}"  class="inputwidth01" style="width:480px"  id="product.salePrice" maxlength="128" />
        </td>
      </tr>
      <tr>
        <td width="15%" style="border-left:none" align="right">排序：</td>
        <td width=""><input name="pv.seq" type="text" value="${pv.seq}"  class="inputwidth01" style="width:40px"  id="product.salePrice" maxlength="128" />
        </td>
      </tr>
    </table>
    </form>
  </div>
  <div class="lapel" style="background:#FFFFFF;"><span><input name="" type="button" class="input01" value="保存" onclick="validate.submit();"/>&nbsp;
  <input name="" type="button" class="input01" value="返回列表" onclick="javascript:window.history.go(-1);"/></span></div>
  
</div>
 <iframe  style="display:none" src="about:blank" name="ifrComposeAttachUpload"></iframe>
</body>
</html>
<script type="text/javascript" src="/scripts/util.js"></script>
<script type="text/javascript" src="/scripts/form_validate.js"></script>
<script type="text/javascript" src="/scripts/calendar.js"></script>
<script type="text/javascript" src="/scripts/page.js"></script>
<script type="text/javascript" src="/scripts/xhr.js"></script>
<script type="text/javascript" src="/scripts/wooboo.js"></script>
<script type="text/javascript" src="/system/config_js.shtml"></script>
<script type="text/javascript">
new FILE({div:"uploadDiv",input:"product.imgPath_input",form:"resourceForm",fileinput:"uploadFile",rate:"rate",ftp:Config["image.cache"],suffix:/.jpg|.png|.bmp|.gif/i});
new FILE({div:"sounduploadDiv",input:"product.soundDesc_input",form:"resourceForm",fileinput:"sounduploadFile",rate:"soundrate",ftp:Config["image.cache"],suffix:/.mp3|.wav|.wma|.m4a|.aac/i,file:'file'});

 //new WBFS({url:'/resource/to_resource.shtml',title:'选择文件',btn:"product.imgPath"});
 //new WBFS({url:'/resource/to_resource.shtml',title:'选择文件',btn:"product.soundDesc"});
 
validate.addvalidte(document.form01,{
        rules:{
           "pv.imgPath":{suffix:/.jpg|.png|.bmp|.gif/i}
           },
	    message:{
	    }
	    });

function isDspChange(th){
	util.$('pv.dspNameSpan').style.display=th.value=='1'?"":"none";
}

isDspChange(util.$('pv.isDsp'));

</script>